<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8" />

    

    

    <title>mybaties-plus3.x整合springboot搭建项目基础框架 | 郑礼德技术栈</title>
    <meta name="author" content="郑礼德" />
    <meta name="keywords" content="" />
    <meta name="description" content="前言：之前一直使用mybaties-plus2.x 我同学说3.x 加了新特性很好用，于是试了一下创建项目，引入项目依赖创建springboot 项目，并添加以下依赖       &amp;lt;dependency&amp;gt;            &amp;lt;groupId&amp;gt;org.springframework.boot&amp;lt;/groupId&amp;gt;            &amp;lt;artifactId&amp;gt;spring-boot-starter-web&amp;lt;/artifact..." />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no" />

    
    <link rel="alternate" href="/homepage/atom.xml" title="郑礼德技术栈" type="application/atom+xml">
    
    
    <link rel="icon" href="/homepage/images/favicon.ico">
    

    <style type="text/css">
    @font-face {
        font-family: 'icomoon';
        src: url("/homepage/fonts/icomoon.eot?q628ml");
        src: url("/homepage/fonts/icomoon.eot?q628ml#iefix") format('embedded-opentype'),
             url("/homepage/fonts/icomoon.ttf?q628ml") format('truetype'),
             url("/homepage/fonts/icomoon.woff?q628ml") format('woff'),
             url("/homepage/fonts/icomoon.svg?q628ml#icomoon") format('svg');
        font-weight: normal;
        font-style: normal;
    }
    </style>
    
<link rel="stylesheet" href="/homepage/css/style.css">


    <!--[if lt IE 9]>
    <style type="text/css">
    .nav-inner {top:0;}
    .author-meta {position:static;top:0;}
    .search-form {height:36px;}
    </style>
    <script type="text/javascript" src="https://unpkg.com/html5shiv@3.7.3/dist/html5shiv.min.js"></script>
    <![endif]-->
<meta name="generator" content="Hexo 4.2.0"></head>
<body>

    <main class="app">
        <header id="header" class="header clearfix">
    <div id="nav" class="nav">
    <div class="nav-mobile">
        <button id="open-panel" class="open-panel nav-mobile-item"><i class="icon-documents"></i></button>
        <h1 class="nav-mobile-title nav-mobile-item">郑礼德技术栈</h1>
        <button id="open-menus" class="open-panel nav-mobile-item"><i class="icon-library"></i></button>
    </div>

    <nav id="nav-inner" class="nav-inner">
        
            <a class="nav-item" href="/homepage/">
                <span class="nav-text">首页</span>
            </a>
        
            <a class="nav-item" href="/homepage/categories/front-end">
                <span class="nav-text">前端</span>
            </a>
        
            <a class="nav-item" href="/homepage/categories/back-end">
                <span class="nav-text">后端</span>
            </a>
        
            <a class="nav-item" href="/homepage/categories/linux">
                <span class="nav-text">linux部署</span>
            </a>
        
            <a class="nav-item" href="/homepage/tags">
                <span class="nav-text">标签</span>
            </a>
        
            <a class="nav-item" href="/homepage/archives">
                <span class="nav-text">归档</span>
            </a>
        
            <a class="nav-item" href="/homepage/about">
                <span class="nav-text">关于</span>
            </a>
        
    </nav>
</div>

    <aside id="aside" class="aside">
    <div id="aside-mask" class="aside-mask"></div>
    <div id="aside-inner" class="aside-inner">
        <form action="//google.com/search" method="get" accept-charset="UTF-8" class="search-form"><input type="search" name="q" class="search-form-input" placeholder="Search"><button type="submit" class="search-form-submit"><i class="icon-search-stroke"></i></button><input type="hidden" name="sitesearch" value="http://zhenglide.gitee.io/homepage"></form>

        
        
        
        

        
        <ol class="toc"><li class="toc-item toc-level-2"><a class="toc-link" href="#创建项目，引入项目依赖"><span class="toc-number">1.</span> <span class="toc-text">创建项目，引入项目依赖</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#配置application-yml和sql-打印文件"><span class="toc-number">2.</span> <span class="toc-text">配置application.yml和sql 打印文件</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#配置mybaties-plus-分页以及填充字段"><span class="toc-number">3.</span> <span class="toc-text">配置mybaties-plus 分页以及填充字段</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#使用生成代码工具"><span class="toc-number">4.</span> <span class="toc-text">使用生成代码工具</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#添加swagger配置类"><span class="toc-number">5.</span> <span class="toc-text">添加swagger配置类</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#添加测试方法"><span class="toc-number">6.</span> <span class="toc-text">添加测试方法</span></a></li></ol>
        
    </div>
</aside>

</header>

        <div id="content" class="content">
            <div id="wrapper" class="wrapper" style="max-width: 800px">
                <article class="article" itemscope itemprop="blogPost">
    
    <header class="article-header">
        
        <h1 itemprop="name">
            mybaties-plus3.x整合springboot搭建项目基础框架
        </h1>
        
        <div class="article-meta clearfix">
            <a class="article-date" href="http://zhenglide.gitee.io/homepage/2020/04/20/mybaties-plus3-x%E6%95%B4%E5%90%88springboot%E6%90%AD%E5%BB%BA%E9%A1%B9%E7%9B%AE%E5%9F%BA%E7%A1%80%E6%A1%86%E6%9E%B6/index.html">
    
    <i class="icon-calendar"></i>
    
    <time datetime="2020-04-20T09:56:39.000Z" itemprop="datePublished">2020-04-20</time>
</a>

            
<div class="article-tag-list">
    <i class="icon-tag"></i>
    <a class="article-tag-link" href="/homepage/tags/java/" rel="tag">java</a>, <a class="article-tag-link" href="/homepage/tags/mybaties-plus/" rel="tag">mybaties-plus</a>, <a class="article-tag-link" href="/homepage/tags/springboot/" rel="tag">springboot</a>
</div>


        </div>
    </header>
    
    <section class="article-body markdown-body">
        
        <p>前言：之前一直使用mybaties-plus2.x 我同学说3.x 加了新特性很好用，于是试了一下</p>
<a id="more"></a>

<h2 id="创建项目，引入项目依赖"><a href="#创建项目，引入项目依赖" class="headerlink" title="创建项目，引入项目依赖"></a>创建项目，引入项目依赖</h2><p>创建springboot 项目，并添加以下依赖</p>
<pre><code class="xml">       &lt;dependency&gt;
            &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
            &lt;artifactId&gt;spring-boot-starter-web&lt;/artifactId&gt;
        &lt;/dependency&gt;
        &lt;!--mybaties-plus 3.x--&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;com.baomidou&lt;/groupId&gt;
            &lt;artifactId&gt;mybatis-plus-boot-starter&lt;/artifactId&gt;
            &lt;version&gt;3.1.0&lt;/version&gt;
        &lt;/dependency&gt;
        &lt;!--数据库驱动--&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;mysql&lt;/groupId&gt;
            &lt;artifactId&gt;mysql-connector-java&lt;/artifactId&gt;
            &lt;version&gt;5.1.26&lt;/version&gt;
        &lt;/dependency&gt;
        &lt;!--打印mysql 查询日志 用低版本有问题--&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;p6spy&lt;/groupId&gt;
            &lt;artifactId&gt;p6spy&lt;/artifactId&gt;
            &lt;version&gt;3.8.1&lt;/version&gt;
        &lt;/dependency&gt;
        &lt;!--代码生成器--&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;com.baomidou&lt;/groupId&gt;
            &lt;artifactId&gt;mybatis-plus-generator&lt;/artifactId&gt;
            &lt;version&gt;3.1.0&lt;/version&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;org.freemarker&lt;/groupId&gt;
            &lt;artifactId&gt;freemarker&lt;/artifactId&gt;
            &lt;version&gt;2.3.30&lt;/version&gt;
        &lt;/dependency&gt;
        &lt;!--Swagger-UI API文档生产工具--&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;io.springfox&lt;/groupId&gt;
            &lt;artifactId&gt;springfox-swagger2&lt;/artifactId&gt;
            &lt;version&gt;2.7.0&lt;/version&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;io.springfox&lt;/groupId&gt;
            &lt;artifactId&gt;springfox-swagger-ui&lt;/artifactId&gt;
            &lt;version&gt;2.7.0&lt;/version&gt;
        &lt;/dependency&gt;

        &lt;dependency&gt;
            &lt;groupId&gt;org.projectlombok&lt;/groupId&gt;
            &lt;artifactId&gt;lombok&lt;/artifactId&gt;
            &lt;optional&gt;true&lt;/optional&gt;
        &lt;/dependency&gt;</code></pre>
<p>注意：1.mybaties-plus 选择版本要在3.1.0  因为使用mybaties-plus 官方提供的代码生成，生成实体类的时候会时间类型会转化成LocalDateTime ,然后3.3.1 会转化类型错误</p>
<p> 2.p6spy是官方推荐的打印sql 语句工具类， 兼容3.1.0 一定要使用 3.8.1 以上版本 用2.x 会报错</p>
<h2 id="配置application-yml和sql-打印文件"><a href="#配置application-yml和sql-打印文件" class="headerlink" title="配置application.yml和sql 打印文件"></a>配置application.yml和sql 打印文件</h2><pre><code class="yaml">server:
  port: 8201
spring:
  datasource:
    url: jdbc:p6spy:mysql://localhost:3306/supermarket_erp?serverTimezone=CTT&amp;useUnicode=true&amp;characterEncoding=utf-8&amp;allowMultiQueries=true&amp;useSSL=true
    password: root
    username: root
    driver-class-name: com.p6spy.engine.spy.P6SpyDriver
mybatis-plus:
  mapper-locations: classpath:mapper/**/*.xml
  type-aliases-package: com.zhenglide.cloud.*.entity</code></pre>
<p>注意： 因为使用了p6spy 所以url 需要增加p6spy 前缀，驱动也需要使用这个包提供的，这个对性能有损耗所以在生产环境需要把它关闭</p>
<p>创建spy.properties</p>
<pre><code class="properties">#3.2.1以上使用
#modulelist=com.baomidou.mybatisplus.extension.p6spy.MybatisPlusLogFactory,com.p6spy.engine.outage.P6OutageFactory
#3.2.1以下使用或者不配置
modulelist=com.p6spy.engine.logging.P6LogFactory,com.p6spy.engine.outage.P6OutageFactory
# 自定义日志打印
logMessageFormat=com.baomidou.mybatisplus.extension.p6spy.P6SpyLogger
#日志输出到控制台
appender=com.baomidou.mybatisplus.extension.p6spy.StdoutLogger
# 使用日志系统记录 sql
#appender=com.p6spy.engine.spy.appender.Slf4JLogger
# 设置 p6spy driver 代理
deregisterdrivers=true
# 取消JDBC URL前缀
useprefix=true
# 配置记录 Log 例外,可去掉的结果集有error,info,batch,debug,statement,commit,rollback,result,resultset.
excludecategories=info,debug,result,commit,resultset
# 日期格式
dateformat=yyyy-MM-dd HH:mm:ss
# 实际驱动可多个
#driverlist=org.h2.Driver
# 是否开启慢SQL记录
outagedetection=true
# 慢SQL记录标准 2 秒
outagedetectioninterval=2</code></pre>
<h2 id="配置mybaties-plus-分页以及填充字段"><a href="#配置mybaties-plus-分页以及填充字段" class="headerlink" title="配置mybaties-plus 分页以及填充字段"></a>配置mybaties-plus 分页以及填充字段</h2><p>配置类</p>
<pre><code class="java">package com.zhenglide.cloud.config;

import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@MapperScan(&quot;com.zhenglide.cloud.*.mapper&quot;)
@Configuration
public class MybatiesPlusConfig {
    @Bean
    public PaginationInterceptor paginationInterceptor(){
       return  new PaginationInterceptor();


   }
   @Bean
    public MetaObjectHandler metaObjectHandler(){
         return new MyMetaObjectHandler();
   }
}
</code></pre>
<p>字段填充类</p>
<pre><code class="java">package com.zhenglide.cloud.config;

import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
import org.apache.ibatis.reflection.MetaObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.time.LocalDateTime;
import java.util.Date;

public class MyMetaObjectHandler implements MetaObjectHandler {
    private static final Logger logger = LoggerFactory
            .getLogger(MyMetaObjectHandler.class);
    /**
     *
     * 配置插入时自动填充字段
     * @param metaObject
     */
    @Override
    public void insertFill(MetaObject metaObject) {
        logger.info(&quot;start insert&quot;);
        this.setInsertFieldValByName(&quot;createTime&quot; ,new Date(),metaObject);
    }

    /**
     *
     * 配置修改时自动填充字段
     * @param metaObject
     */
    @Override
    public void updateFill(MetaObject metaObject) {
        logger.info(&quot;start update&quot;);
//        this.strictUpdateFill(metaObject, &quot;updateTime&quot;, LocalDateTime.class, LocalDateTime.now()); // 起始版本 3.3.0(推荐使用)
        this.setInsertFieldValByName(&quot;updateTime&quot; ,new Date(),metaObject);
    }
}
</code></pre>
<h2 id="使用生成代码工具"><a href="#使用生成代码工具" class="headerlink" title="使用生成代码工具"></a>使用生成代码工具</h2><p>注意3.x 以后的mybaties-plus 没有集成这个包，必须引入依赖mybatis-plus-generator和模板引擎,使用官方提供的demo 然后改造一下你要的效果</p>
<pre><code class="java">package com.zhenglide.cloud.utils;


import java.util.*;

import com.baomidou.mybatisplus.core.exceptions.MybatisPlusException;
import com.baomidou.mybatisplus.core.toolkit.StringPool;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.baomidou.mybatisplus.generator.config.*;
import com.baomidou.mybatisplus.generator.config.po.TableInfo;
import com.baomidou.mybatisplus.generator.engine.FreemarkerTemplateEngine;
import org.springframework.stereotype.Component;

import com.baomidou.mybatisplus.generator.AutoGenerator;
import com.baomidou.mybatisplus.generator.InjectionConfig;
import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy;


public class MpGenerator3 {
    /**
     * &lt;p&gt;
     * 读取控制台内容
     * &lt;/p&gt;
     */
    public static String scanner(String tip) {
        Scanner scanner = new Scanner(System.in);
        StringBuilder help = new StringBuilder();
        help.append(&quot;请输入&quot; + tip + &quot;：&quot;);
        System.out.println(help.toString());
        if (scanner.hasNext()) {
            String ipt = scanner.next();
            if (StringUtils.isNotEmpty(ipt)) {
                return ipt;
            }
        }
        throw new MybatisPlusException(&quot;请输入正确的&quot; + tip + &quot;！&quot;);
    }

    /**
     * RUN THIS
     */
    public static void main(String[] args) {
        // 代码生成器
        AutoGenerator mpg = new AutoGenerator();

        // 全局配置
        GlobalConfig gc = new GlobalConfig();
        String projectPath = System.getProperty(&quot;user.dir&quot;);
        gc.setOutputDir(projectPath + &quot;/user-service/src/main/java&quot;);
        gc.setAuthor(&quot;zhenglide&quot;);
        gc.setOpen(false);
        mpg.setGlobalConfig(gc);

        // 数据源配置
        DataSourceConfig dsc = new DataSourceConfig();
        dsc.setUrl(&quot;jdbc:mysql://localhost:3306/blog?useUnicode=true&amp;serverTimezone=GMT&amp;useSSL=false&amp;characterEncoding=utf8&quot;);
        // dsc.setSchemaName(&quot;public&quot;);
        dsc.setDriverName(&quot;com.mysql.jdbc.Driver&quot;);
        dsc.setUsername(&quot;root&quot;);
        dsc.setPassword(&quot;root&quot;);
        mpg.setDataSource(dsc);

        // 包配置
        PackageConfig pc = new PackageConfig();
        pc.setModuleName(&quot;sys&quot;);
        pc.setParent(&quot;com.zhenglide.cloud&quot;);
        mpg.setPackageInfo(pc);

        // 自定义配置
        InjectionConfig cfg = new InjectionConfig() {
            @Override
            public void initMap() {
                // to do nothing
            }
        };
        List&lt;FileOutConfig&gt; focList = new ArrayList&lt;&gt;();
        focList.add(new FileOutConfig(&quot;/templates/mapper.xml.ftl&quot;) {
            @Override
            public String outputFile(TableInfo tableInfo) {
                // 自定义输入文件名称
                return projectPath + &quot;/user-service/src/main/resources/mapper/&quot; + pc.getModuleName()
                        + &quot;/&quot; + tableInfo.getEntityName() + &quot;Mapper&quot; + StringPool.DOT_XML;
            }
        });
        cfg.setFileOutConfigList(focList);
        mpg.setCfg(cfg);
        mpg.setTemplate(new TemplateConfig().setXml(null));

        // 策略配置
        StrategyConfig strategy = new StrategyConfig();
        strategy.setNaming(NamingStrategy.underline_to_camel);
        strategy.setColumnNaming(NamingStrategy.underline_to_camel);
//        strategy.setSuperEntityClass(&quot;com.baomidou.mybatisplus.samples.generator.common.BaseEntity&quot;);
        strategy.setEntityLombokModel(true);
//        strategy.setSuperControllerClass(&quot;com.baomidou.mybatisplus.samples.generator.common.BaseController&quot;);
        strategy.setInclude(&quot;sys_user&quot;);
//        strategy.setSuperEntityColumns(&quot;id&quot;);
        strategy.setControllerMappingHyphenStyle(true);
        strategy.setTablePrefix(pc.getModuleName() + &quot;_&quot;);
        mpg.setStrategy(strategy);
        // 选择 freemarker 引擎需要指定如下加，注意 pom 依赖必须有！
        mpg.setTemplateEngine(new FreemarkerTemplateEngine());
        mpg.execute();
    }
}</code></pre>
<h2 id="添加swagger配置类"><a href="#添加swagger配置类" class="headerlink" title="添加swagger配置类"></a>添加swagger配置类</h2><pre><code class="java"> @Bean
    public Docket createRestApi(){
        return new Docket(DocumentationType.SWAGGER_2)
                .apiInfo(apiInfo())
                .select()
                .apis(RequestHandlerSelectors.basePackage(&quot;com.zhenglide.cloud.sys.controller&quot;))
                .paths(PathSelectors.any())
                .build();
//                .securitySchemes(securitySchemes())
//                .securityContexts(securityContexts());
    }

    private ApiInfo apiInfo() {
        return new ApiInfoBuilder()
                .title(&quot;用户权限模块&quot;)
                .description(&quot;用户权限模块&quot;)
                .contact(&quot;zhenglide&quot;)
                .version(&quot;1.0&quot;)
                .build();
    }</code></pre>
<h2 id="添加测试方法"><a href="#添加测试方法" class="headerlink" title="添加测试方法"></a>添加测试方法</h2><pre><code class="java">@Api(description = &quot;用户管理&quot; ,tags = &quot;UserController&quot;)
@Controller
@RequestMapping(&quot;/sys/user&quot;)
public class UserController {

    @Autowired
    IUserService userService;

   @ApiOperation(&quot;查询用户列表&quot;)
   @GetMapping(&quot;list&quot;)
   @ResponseBody
    public List&lt;User&gt; list(){
       return userService.list();
   }
    @ApiOperation(&quot;查询用户列表&quot;)
    @GetMapping(&quot;getUserByUsername&quot;)
    @ResponseBody
    public User getUserByUsername(@RequestParam String username){
        return userService.getOne(new QueryWrapper&lt;User&gt;().lambda().eq(User::getUsername,username));
    }
}</code></pre>
<img src="/homepage/2020/04/20/mybaties-plus3-x%E6%95%B4%E5%90%88springboot%E6%90%AD%E5%BB%BA%E9%A1%B9%E7%9B%AE%E5%9F%BA%E7%A1%80%E6%A1%86%E6%9E%B6/mybatiesPlus%E6%B5%8B%E8%AF%95%E7%BB%93%E6%9E%9C.png" class="">

<p>mybatiesplus 增加了lamb表达式写法，比较不容易出错</p>

        
    </section>
</article>



<a id="pagenext" href="/homepage/2020/04/13/%E4%BD%BF%E7%94%A8docker%E5%AE%89%E8%A3%85oracle/" class="article-next" title="使用docker安装oracle"><i class="icon-arrow-right"></i></a>


<a id="pageprev" href="/homepage/2020/05/06/jest-vue%E6%B5%8B%E8%AF%95%E5%A5%97%E4%BB%B6%E4%BD%BF%E7%94%A8/" class="article-prev" title="jest-vue测试套件使用"><i class="icon-arrow-left"></i></a>




            </div>
        </div>
        <footer class="footer">
    Powered by <a href="http://hexo.io/" target="_blank">Hexo</a>, Theme by <a href="https://github.com/sanonz/hexo-theme-concise" target="_blank">Concise</a>

    
    <script>
        var _hmt = _hmt || [];
        (function () {
            var hm = document.createElement("script");
            hm.src = "https://hm.baidu.com/hm.js?b13bb4c2ef8300062aab9732bd22eae0";
            var s = document.getElementsByTagName("script")[0];
            s.parentNode.insertBefore(hm, s);
        })();
    </script>
    
</footer>

    </main>

    <script type="text/javascript" src="https://cdn.bootcss.com/jquery/1.9.0/jquery.min.js"></script>
    <script type="text/javascript">
    $(function() {
        var nodes = {
            nav: $('#nav'),
            aside: $('#aside'),
            asideInner: $('#aside-inner'),
            navInner: $('#nav-inner')
        };

        var doing = false;
        nodes.asideInner.on('webkitAnimationEnd mozAnimationEnd oAnimationEnd oanimationend animationend', function() {
            if (nodes.aside.hasClass('mobile-open')) {
                nodes.aside.removeClass('mobile-open');
            } else {
                nodes.aside.removeClass('mobile-close panel-show');
            }
            doing = false;
        });
        $('#open-panel, #aside-mask').on('click', function() {
            if (doing) {
                return;
            }

            if (nodes.aside.hasClass('panel-show')) {
                nodes.aside.addClass('mobile-close');
            } else {
                nodes.aside.addClass('mobile-open panel-show');
            }
        });
        $('#open-menus').on('click', function() {
            nodes.navInner.slideToggle();
        });

        if (window.innerWidth <= 960) {
            setTimeout(function() {
                nodes.navInner.slideUp();
            }, 3000);
        }
    });
    </script>
    
        
<script src="/homepage/js/scrollspy.min.js"></script>

        <script type="text/javascript">
        $(document.body).scrollspy({target: '#aside-inner'});

        $(window).on('resize', function() {
            var hw = $('#header').width();
            var ww = $('#wrapper').width();
            var space = ($(this).width() - hw - ww) / 2 / 2;

            var pageprev = $('#pageprev');
            var pagenext = $('#pagenext');
            var avg = (pageprev.width() + pagenext.width()) / 2

            if(space > avg) {
                var len = space - avg / 2;
                var styles = {position: 'fixed', top: '50%', marginTop: - (pageprev.width() + pagenext.width()) / 4}
                pageprev.css($.extend({left: hw + len}, styles));
                pagenext.css($.extend({right: len}, styles));
            } else {
                pageprev.removeAttr('style');
                pagenext.removeAttr('style');
            }
        }).trigger('resize');
        </script>
    

</body>
</html>
